// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Author: Markus Gutschke

#include <stdarg.h>
#include <stdio.h>
#include <unistd.h>

#include "check.h"

void fatal(const char *fmt, ...) {
  va_list ap;
  va_start(ap, fmt);
  vfprintf(stderr, fmt, ap);
  fputs("\n", stderr);
  va_end(ap);
#ifdef CORE
  abort();
#else
  _exit(1);
#endif
}
